//
//  LJP_GuideCollectionViewCell.m
//  God_is_a_Girl
//
//  Created by 李继鹏 on 15/10/4.
//  Copyright (c) 2015年 呸. All rights reserved.
//

#import "LJP_GuideCollectionViewCell.h"

@implementation LJP_GuideCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.pic = [[UIImageView alloc] init];
        self.pic.layer.cornerRadius = 5;
        self.pic.layer.masksToBounds = YES;
        self.title = [[UILabel alloc] init];
        self.title.textAlignment = NSTextAlignmentCenter;
        self.title.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:self.pic];
        [self.contentView addSubview:self.title];
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.pic.frame = CGRectMake(0, 0, ([UIScreen mainScreen].bounds.size.width - 40) / 3, ([UIScreen mainScreen].bounds.size.width - 40) / 3);
    self.title.frame = CGRectMake(0, ([UIScreen mainScreen].bounds.size.width - 40) / 3 + 5, ([UIScreen mainScreen].bounds.size.width - 40) / 3, 20);
}


@end
